package descarte.com.br.descarte;

import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.Toast;

import java.util.ArrayList;

/**
 * Created by kcpo on 21/03/2015.
 */
public class NovaReciclagemActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_nova_reciclagem);

        ActionBar actionBar = getActionBar();
        actionBar.setTitle("Nova Reciclagem");
        actionBar.setDisplayHomeAsUpEnabled(true);

        Button btPapeis = (Button) findViewById(R.id.btPapeis);
        Button btVidros = (Button) findViewById(R.id.btVidros);
        Button btPlasticos = (Button) findViewById(R.id.btPlasticos);
        Button btMetais = (Button) findViewById(R.id.btMetais);

        btPapeis.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PropertiesUtils.getInscance().setCategoria(PropertiesUtils.TipoReciclado.PAPÉIS.toString());
                nextScreen();
            }
        });
        btVidros.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PropertiesUtils.getInscance().setCategoria(PropertiesUtils.TipoReciclado.VIDROS.toString());
                nextScreen();
            }
        });
        btPlasticos.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PropertiesUtils.getInscance().setCategoria(PropertiesUtils.TipoReciclado.PLÁSTICOS.toString());
                nextScreen();
            }
        });
        btMetais.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PropertiesUtils.getInscance().setCategoria(PropertiesUtils.TipoReciclado.METAIS.toString());
                nextScreen();
            }
        });
    }

    private void nextScreen() {
        Intent intent = new Intent(this, NovaReciclagemActivity2.class);
        startActivity(intent);
    }

}
